home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / tde40.zip / capslock.c < prev    next >
C/C++ Source or Header  |  1994-06-05  |  2KB  |  60 lines

  1. /*
  2.  * These functions were contributed by Byrial Jensen.  They are useful with
  3.  *  Caps lock and non-English languages.
  4.  *
  5.  *
  6.  */
  7.  
  8. /* Editor:      TDE, the Thomson-Davis Editor
  9.  * Filename:    capslock.c
  10.  * Compiled by: Byrial Jensen
  11.  *
  12.  * This file contains changed duplicates of existing functions, and
  13.  * new functions.
  14.  * The changes have the purpose to better allow creation of
  15.  * non English versions of the editor.
  16.  * This file contains all changes relating to the new editor
  17.  * functions IfCapsLock and IfNotCapsLock.
  18.  */
  19.  
  20.  
  21. #include "tdestr.h"
  22. #include "common.h"
  23. #include "define.h"
  24. #include "tdefunc.h"
  25.  
  26.  
  27. /*
  28.  * Name:    capslock_active   (NEW FUNCTION)
  29.  * Purpose: To find out if Caps Lock is active
  30.  * Date:    September 1, 1993
  31.  * Author:  Byrial Jensen
  32.  * Returns: Non zero if Caps Lock is actice,
  33.  *          Zero if Caps Lock is not actice.
  34.  * Note:    The function reads directly the BIOS variable
  35.  *          at address 0040h:0017h bit 6
  36.  */
  37. int  capslock_active( void )
  38. {
  39. #if defined( __UNIX__ )
  40.    return( 0 );
  41. #else
  42.    return( (int)( *((unsigned char far *)0x00400017L) & 0x40 ) );
  43. #endif
  44. }
  45.  
  46.  
  47. /*
  48.  * Name:    nothing     (NEW FUNCTION)
  49.  * Purpose: Does nothing
  50.  * Date:    September 2, 1992
  51.  * Author:  Byrial Jensen
  52.  * Passed:  arg_filler:  argument to satify function prototype
  53.  * Returns: OK.
  54.  * Notes:   Called for editor functions IfCapsLock and IfNotCapsLock
  55.  */
  56. int  nothing( TDE_WIN *arg_filler )
  57. {
  58.    return( OK );
  59. }
  60.